//
//  PKRadioMainListCell.m
//  AMomentApp
//
//  Created by lanou on 15/10/4.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "PKRadioMainListCell.h"
#import "UIImageView+WebCache.h"
@implementation PKRadioMainListCell

-(void)setConfigureModel:(PKRadioMainListModel *)configureModel
{
    _configureModel = configureModel;
    
    [_pictureView sd_setImageWithURL:[NSURL URLWithString:configureModel.coverimg]];
    _titleLabel.text = configureModel.title;
    _countLabel.text = [NSString stringWithFormat:@"%@",configureModel.count];
    _uNameLabel.text = [NSString stringWithFormat:@"by:%@",configureModel.uname];
    _descLabel.text = configureModel.desc;
}

+ (CGFloat)heightForRadioCell
{
    return 100;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _pictureView = [[UIImageView alloc]initWithFrame:CGRectMake(10 ,10 ,80 ,80)];
        [self.contentView addSubview:_pictureView];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(100, 10, SCREEN_WIDTH-100, 30)];
        [self.contentView addSubview:_titleLabel];
        
        _countLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-80, 15, 70, 20)];
        _countLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_countLabel];
        
        _uNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(100, 45, SCREEN_WIDTH-100, 20)];
        _uNameLabel.font = [UIFont systemFontOfSize:14];
        _uNameLabel.textColor = [UIColor colorWithRed:0.065 green:0.538 blue:0.974 alpha:1.000];
        [self.contentView addSubview:_uNameLabel];
        
        _descLabel = [[UILabel alloc]initWithFrame:CGRectMake(100, 70, SCREEN_WIDTH -100, 20)];
        _descLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_descLabel];
    }
    return self;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
